home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Prog / D-G / FORTRAN Goodies / FORTRAN Macros for EXCEL / Source Code / beep.f next >
Encoding:
Text File  |  1992-01-31  |  819 b   |  43 lines  |  [TEXT/MPS ]

  1. !!MP Inlines.f
  2.  
  3. C    An example of a FORTRAN Resource for Microsoft Excel 3.0
  4. C    This example calls sysbeep the specified number of times.
  5. C    Testing for this example was done with Language Systems
  6. C    FORTRAN version 3.0
  7. C    
  8. C    Below are the commands that were executed to create the 
  9. C    code resource
  10.  
  11. !!IFC FALSE
  12.  FORTRAN BEEP.f -opt=1 -noimplicit
  13. Link -w -f -srt -ad 4 -t '????' -c '????' ∂
  14. -m BEEP -sn Main=BEEP ∂
  15. -sn f_RunTime=BEEP ∂
  16. -sn f_Intrinsics=BEEP ∂
  17.     BEEP.f.o ∂
  18.     "{FLibraries}"OutpwStubs.o ∂
  19.     "{Libraries}"Runtime.o ∂
  20.     "{Libraries}"Interface.o ∂
  21.     "{FLibraries}"FORTRANlib.o ∂
  22.     "{FLibraries}"IntrinsicLib.o ∂
  23.     "{FLibraries}"FSANELib.o ∂
  24.     -o BEEP.rsc
  25. !!ENDC
  26.  
  27. C    Source code
  28.  
  29.     integer*2 function beep(%val(num))
  30.     
  31.     integer*2 num,dur,i
  32.     
  33.     dur = 3
  34.     do i = 1,num
  35.         call sysbeep(dur)
  36.         beep = 1
  37.     enddo
  38.     
  39.     return
  40.     end
  41.     
  42.         
  43.